Random = Mock.Random

function getRechargeRes(){
    let data = Mock.mock({
        'amount' : Random.float(1,100,2,2)
    })

    json = {
        data,
        'code' : 200,
        'msg' : '充值成功'
    }

    return json

}

function getAmount(){
    let data = Mock.mock({
        'amount' : Random.float(100,1000,2,2)
    })

    json = {
        data,
        'code' : 200,
        'msg' : '查询成功'
    }

    return json
}

Mock.mock('http://localhost/recharge.php', 'post', getRechargeRes)

